// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by sidekick. DO NOT EDIT.

/// A dyn-compatible, crate-private version of [super::BinauthzManagementServiceV1].
#[async_trait::async_trait]
pub trait BinauthzManagementServiceV1: std::fmt::Debug + Send + Sync {
    async fn get_policy(
        &self,
        req: crate::model::GetPolicyRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Policy>>;

    async fn update_policy(
        &self,
        req: crate::model::UpdatePolicyRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Policy>>;

    async fn create_attestor(
        &self,
        req: crate::model::CreateAttestorRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Attestor>>;

    async fn get_attestor(
        &self,
        req: crate::model::GetAttestorRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Attestor>>;

    async fn update_attestor(
        &self,
        req: crate::model::UpdateAttestorRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Attestor>>;

    async fn list_attestors(
        &self,
        req: crate::model::ListAttestorsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListAttestorsResponse>>;

    async fn delete_attestor(
        &self,
        req: crate::model::DeleteAttestorRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>>;
}

/// All implementations of [super::BinauthzManagementServiceV1] also implement [BinauthzManagementServiceV1].
#[async_trait::async_trait]
impl<T: super::BinauthzManagementServiceV1> BinauthzManagementServiceV1 for T {
    /// Forwards the call to the implementation provided by `T`.
    async fn get_policy(
        &self,
        req: crate::model::GetPolicyRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Policy>> {
        T::get_policy(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn update_policy(
        &self,
        req: crate::model::UpdatePolicyRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Policy>> {
        T::update_policy(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn create_attestor(
        &self,
        req: crate::model::CreateAttestorRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Attestor>> {
        T::create_attestor(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_attestor(
        &self,
        req: crate::model::GetAttestorRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Attestor>> {
        T::get_attestor(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn update_attestor(
        &self,
        req: crate::model::UpdateAttestorRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Attestor>> {
        T::update_attestor(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_attestors(
        &self,
        req: crate::model::ListAttestorsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListAttestorsResponse>> {
        T::list_attestors(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn delete_attestor(
        &self,
        req: crate::model::DeleteAttestorRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>> {
        T::delete_attestor(self, req, options).await
    }
}

/// A dyn-compatible, crate-private version of [super::SystemPolicyV1].
#[async_trait::async_trait]
pub trait SystemPolicyV1: std::fmt::Debug + Send + Sync {
    async fn get_system_policy(
        &self,
        req: crate::model::GetSystemPolicyRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Policy>>;
}

/// All implementations of [super::SystemPolicyV1] also implement [SystemPolicyV1].
#[async_trait::async_trait]
impl<T: super::SystemPolicyV1> SystemPolicyV1 for T {
    /// Forwards the call to the implementation provided by `T`.
    async fn get_system_policy(
        &self,
        req: crate::model::GetSystemPolicyRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Policy>> {
        T::get_system_policy(self, req, options).await
    }
}

/// A dyn-compatible, crate-private version of [super::ValidationHelperV1].
#[async_trait::async_trait]
pub trait ValidationHelperV1: std::fmt::Debug + Send + Sync {
    async fn validate_attestation_occurrence(
        &self,
        req: crate::model::ValidateAttestationOccurrenceRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ValidateAttestationOccurrenceResponse>>;
}

/// All implementations of [super::ValidationHelperV1] also implement [ValidationHelperV1].
#[async_trait::async_trait]
impl<T: super::ValidationHelperV1> ValidationHelperV1 for T {
    /// Forwards the call to the implementation provided by `T`.
    async fn validate_attestation_occurrence(
        &self,
        req: crate::model::ValidateAttestationOccurrenceRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ValidateAttestationOccurrenceResponse>>
    {
        T::validate_attestation_occurrence(self, req, options).await
    }
}
